import React from 'react';

const index = props => {
  const userInfo = JSON.parse(window.sessionStorage.getItem('user')) || { username: '暂未登录' };
  return (
    <div>
      <h1>我是首页</h1>
      <h2>欢迎您！{userInfo.username}</h2>
    </div>
  );
};

export default index;
